{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# ARMA模型"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 原理讲解\n",
    "\n",
    "为了使模型更好地拟合数据，可以将 $AR(p)$ 与 $MA(q)$ 结合起来，得到 $ARMA(p,q)$ ：\n",
    "\n",
    "$$y_{t}=\\beta_{0}+\\beta_{1} y_{t-1}+\\cdots+\\beta_{p} y_{t-p}+\\varepsilon_{t}+\\theta_{1} \\varepsilon_{t-1}+\\cdots+\\theta_{q} \\varepsilon_{t-q}\\tag{1}$$\n",
    "\n",
    "其中，{$\\varepsilon _t$} 为白噪声。在给定 $\\left\\{y_{1}, y_{2}, \\cdots, y_{p}\\right\\}$ 与“$\\varepsilon_{0}=\\varepsilon_{-1}=\\cdots=\\varepsilon_{-q+1}=0$”的条件下，可以使用条件 MLE 来估计 $ARMA(p,q)$。为了估计 $ARMA(p,q)$，首先必须确定 $(p,q)$，而经济理论通常不能提供这些信息，故只能根据数据来估计 $(p,q)$。\n",
    "在实践中，常常先考察数据的自相关函数（ACF）与偏自相关函数（PACF），以判断是否存在 p=0 或 q=0 的情形。"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
